<?php include_once('../layouts/header.php') ?>
<div class="easyui-layout" data-options="fit:true">
    <div  data-options="region:'center',border:false">
        <table id="products" title="<code>TableGrid</code>" class="easyui-datagrid"
            data-options="
            type:'datagrid',
            url:'/data/index.php?type=table',
            toolbar:'#products-toolbar',
            singleSelect:false,
            callback:{
                method:'openTab',
                oTab:{
                    title:'打开新标签',
                    ttarget:'openTab唯一标识',
                    ttype:'iframe',
                    url:'http://www.baidu.com',
                },
            },
            ">
            <thead data-options="frozen:true">
                <tr>
                    <th data-options="field:'ItemId',checkbox:true"></th>
                    <th data-options="field:'PModelNo',sortable:true,formatter:function(value){
                        var options = {method:'openTab',oTab:{title:'产品详情',ttype:'iframe',url:'/html/test/detail.php',ttarget:'_html_test_detail',replaceLoad:true},value:value,param:{PModelNo:value}};
                        return $.grid.format.link(options,this);
                    }">产品型号编号</th>
                    <th data-options="field:'PNo',sortable:true">产品编号</th>
                </tr>
            </thead>
            <thead>
                <tr>
                    <th data-options="field:'PModel',sortable:true">产品型号</th>
                    <th data-options="field:'POrderNo',sortable:true">产品订货号</th>
                    <th data-options="field:'POrderSn',sortable:true">产品系统订货号</th>
                    <th data-options="field:'Punit',sortable:true">计量单位</th>
                    <th data-options="field:'Pseries',sortable:true">产品系列</th>
                    <th data-options="field:'PCreateTime',sortable:true">生产时间</th>
                </tr>
            </thead>
        </table>
    </div>
</div>

<div id="products-toolbar" style="display: none;">

    <div class="btn btn-sm btn-hope easyui-splitbutton" data-options="menu:'#PsimpleOPs'">
        <i class="fa fa-list"></i>简单操作
    </div>

    <div class="btn btn-sm btn-purple easyui-splitbutton" data-options="menu:'#PmultiOPs'">
        <i class="fa fa-list"></i>批量操作
    </div>


    <div class="btn btn-sm btn-gray" onclick="$.comboEvn(this)"
     data-options="
        method:'openWindow',
        url:'https://www.baidu.com'
     ">
        <i class="fa fa-internet-explorer"></i> 打开新窗口
    </div>
    <div class="btn btn-sm btn-info" onclick="$.comboEvn(this)"
     data-options="
        method:'openTab',
        oTab:{
            title:'打开新标签',
            ttarget:'openTab唯一标识',
            ttype:'iframe',
            url:'https://www.baidu.com',
        },
     ">
        <i class="fa fa-tag"></i>打开新标签
    </div>

    <div class="btn btn-sm btn-warning" onclick="$.comboEvn(this)"
     data-options="
        method:'doAjax',
        url:'/data/index.php?type=batch',
        confirmMsg:'你确定要做此操作吗？',
        grid:{
            type:'datagrid',
            id:'#products',
            params:'Id:ItemId,PModelNo',
            uncheckMsg:'请先勾选要批量操作的数据',
            chkSelects:2,
            updateRow:true,
        },
     ">
        <i class="fa fa-trash"></i>批量删除
    </div>

    <div class="btn btn-sm btn-danger" onclick="$.comboEvn(this)"
     data-options="
        method:'doAjax',
        url:'/data/index.php?type=row',
        confirmMsg:'你确定要做此操作吗？',
        grid:{
            type:'datagrid',
            id:'#products',
            params:'ItemId,PModelNo',
            uncheckMsg:'请先勾选要操作的数据',
            chkSelects:1,
            updateRow:true,
        },
     ">
        <i class="fa fa-trash-o"></i>删除
    </div>

    <div class="btn btn-sm btn-success" onclick="$.comboEvn(this)"
     data-options="
        method:'openDialog',
        dialog:{
            id:'openDialogAdd',
            title:'新增',
            href:'/html/form/addFrom.php',
        },
        grid:{
            type:'datagrid',
            id:'#products',
            params:'Id:ItemId',
            uncheckMsg:'请先勾选要操作的数据',
            chkSelects:1,
            updateRow:true,
        },
     ">
        <i class="fa fa-plus"></i>新增
    </div>

    <div class="btn btn-sm btn-primary" onclick="$.comboEvn(this)"
     data-options="
        method:'openDialog',
        dialog:{
            id:'openDialogEdit',
            title:'编辑',
            href:'/html/form/addFrom.php',
        },
        grid:{
            type:'datagrid',
            id:'#products',
            params:'Id:ItemId,PModelNo',
            uncheckMsg:'请先勾选要操作的数据',
            chkSelects:1,
            updateRow:true,
        },
     ">
        <i class="fa fa-pencil"></i>编辑
    </div>

    <div class="btn btn-sm btn-default btn-outline btn-search" onclick="$.comboEvn(this)"
     data-options="
        method:'openDialog',
        dialog:{
            title:'检索',
            content:'#Psearch',
        },
        grid:{
            type:'datagrid',
            id:'#products',
        },
     ">
        检索
    </div>
</div>

<!-- 简单操作的下拉 -->
<div id="PsimpleOPs" style="display: none;">
    <div onclick="$.comboEvn(this)"
     data-options="
        iconCls:'fa fa-file',
        method:'request',
        url:'/html/echarts/echarts.php',
     ">页面重定向</div>
    <div data-options="iconCls:'fa fa-reply'">返回</div>
    <div class="menu-sep"></div>
    <div data-options="iconCls:'fa fa-copy'">粘贴</div>
    <div class="menu-sep"></div>
    <div data-options="iconCls:'fa fa-cut'">剪切</div>
    <div data-options="iconCls:'fa fa-check-square-o'">选中</div>
    <div data-options="iconCls:'fa fa-check-square'">全部</div>
    <div onclick="$.submitForm(this)"
     data-options="
        iconCls:'fa fa-file-excel-o',
        form:{
            id:'#queryForm',
            url:'',
        },
        callback:[
            {
                method:'export',
                url:'/data/index.php?type=export',
                fileName:'列表数据',
                ext:'xls',
            }
        ]
     ">导出</div>
</div>

<!-- 批量操作的下拉 -->
<div id="PmultiOPs" style="display: none;">
    <div data-options="iconCls:'fa fa-file'">确定</div>
    <div class="menu-sep"></div>
    <div data-options="iconCls:'fa fa-close'">取消</div>
    <div>
        <span>Toolbar</span>
        <div>
            <div>Address</div>
            <div>Link</div>
            <div>Bookmark Toolbar</div>
            <div class="menu-sep"></div>
            <div>
                <span>Navigation Toolbar</span>
                <div>
                    <div>zhuhui</div>
                    <div>朱辉</div>
                    <div>张三</div>
                </div>
            </div>
            <div>New Toolbar...</div>
        </div>
    </div>
</div>

<!-- 检索的弹出框 -->
<div id="Psearch" style="display: none;">
    <div dialog="body" class="dialog-box">
        <div class="easyui-layout" data-options="fit:true">
            <form id="queryForm" class="container" method="post">
                <div class="dialog-header" data-options="region:'north',border:false">
                    <div class="btn btn-warning">警告</div>
                    <div class="btn btn-success">完成</div>
                </div>
                <div data-options="region:'center',border:false">
                    <div class="container">
                        <div class="form-box sm-form">
                            <div class="form-item">
                                <div class="form-input input-group">
                                    <span class="input-icon"><i class="fa fa-envelope"></i></span><input type="text" placeholder="邮箱" value="" name="email">
                                </div>
                            </div>
                            <div class="form-item row">
                                <div class="form-input input-group col-6">
                                    <span class="input-icon"><i class="fa fa-envelope"></i></span><input class="group-input" type="text" placeholder="QQ" value="" name="qq">
                                </div>
                                <div class="form-input input-group col-6">
                                    <span class="input-icon"><i class="fa fa-envelope"></i></span><input class="group-input" type="text" placeholder="昵称" value="" name="nickName">
                                </div>
                            </div>
                            <div class="form-item row">
                                <div class="form-input input-group groups col-6">
                                    <div class="group-text">真实名称</div>
                                    <input class="group-input" type="text" placeholder="真实名称" value="" name="realName">
                                </div>
                                <div class="form-input input-group groups col-6">
                                    <div class="group-text">联系方式</div>
                                    <input class="group-input" type="text" placeholder="联系方式" value="" name="userName">
                                </div>
                            </div>
                            <div class="form-item">
                                <div class="form-input input-group groups">
                                    <div class="group-text">家庭住址</div>
                                    <input class="group-input" type="text" placeholder="家庭住址" value="" name="address">
                                </div>
                            </div>
                            <div class="form-item row">
                                <div class="form-input col-12">
                                    <label class="form-label"><span>爱好：</span></label>
                                    <label class="form-label form-checkbox"><input type="checkbox" name="like[]" value="football"><span class="checkbox-text">足球</span></label>
                                    <label class="form-label form-checkbox"><input type="checkbox" name="like[]" value="basketball"><span class="checkbox-text">篮球</span></label>
                                    <label class="form-label form-checkbox"><input type="checkbox" name="like[]" value="book"><span class="checkbox-text">看书</span></label>
                                    <label class="form-label form-checkbox"><input type="checkbox" name="like[]" value="music"><span class="checkbox-text">音乐</span></label>
                                </div>
                            </div>
                            <div class="form-item">
                                <div class="form-input input-group">
                                    <span class="input-icon"><i class="fa fa-lock"></i></span><input repeat="pwd" type="password" placeholder="密码" value="" name="password1">
                                </div>
                            </div>
                            <div class="form-item row">
                                <div class="form-input input-group col-6">
                                    <span class="input-icon"><i class="fa fa-lock"></i></span><input class="easyui-passwordbox" prompt="密码" iconWidth="28" data-options="width:'100%'" name="password2">
                                </div>
                                <div class="form-input input-group groups col-6">
                                    <span class="group-text">密码</span><input class="easyui-passwordbox" prompt="密码" iconWidth="28" data-options="width:'100%'" class="group-input" name="password3">
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
                <div dialog="buttons" class="dialog-footer" data-options="region:'south',border:false">
                    <div class="btn btn-success" onclick="$.clearForm(this)"
                     data-options="
                        form:{
                            id:'#queryForm',
                        },
                        callback:{
                            method:'reloadGrid',
                            grid:{
                                type:'datagrid',
                                id:'#products',
                                updateRow:true,
                            }
                        }
                     ">清空</div>
                    <div class="btn btn-primary" onclick="$.submitForm(this)"
                     data-options="
                        form:{
                            id:'#queryForm',
                            url:'',
                        },
                        callback:[
                            {
                                method:'closeDialog',
                                dialog:{
                                    id:'#Psearchbody',
                                }
                            },
                            {
                                method:'reloadGrid',
                                grid:{
                                    type:'datagrid',
                                    id:'#products',
                                    updateRow:true,
                                }
                            }
                        ]
                     ">提交</div>
                </div>
            </form>
        </div>
    </div>
</div>

<?php include_once('../layouts/footer.php') ?>








